<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
		<title>up.html</title>

		<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
		<meta http-equiv="description" content="this is my page">
		<meta http-equiv="content-type" content="text/html; charset=UTF-8">

		<!--<link rel="stylesheet" type="text/css" href="./styles.css">-->
		<script type="text/javascript">
		var allow = ".xls";
		function submitCheck(form, file) {
			allowSubmit = false;
			if (!file)
				return;
			while (file.indexOf("\\") != -1)
				file = file.slice(file.indexOf("\\") + 1);
			ext = file.slice(file.indexOf(".")).toLowerCase();//slice 切割保留后面
		
			if (allow == ext) {
				allowSubmit = true;
			}
			if (allowSubmit)
				return true;
			else {
				alert("对不起，只能上传以下格式的文件:  " + allow + "\n请重新选择符合条件的文件" + "再上传.");
				return false;
			}

}
</script>
	</head>
	<body>
	<h1>导入员工记录</h1>
	<hr>
	请选择要导入的Excel(1997~2003)文件
	<hr>
		<form name="UploadForm" enctype="multipart/form-data" method="post"
			action="../EmployeeServlet?type=upload">
			<input type="file" name="employee_file" size="20" maxlength="20">
			<input type="submit" value="上传"
				onclick=" return submitCheck(this.form,this.form.employee_file.value)">
		</form>
	</body>
</html>
